<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    紧急通知：<span th:text="${warning}"></span>
    <hr>

    用户信息： id:<span th:text="${user.id}"></span><br>
            姓名:<span th:text="${user.userName}"></span><br>
            电话:<input th:value="${user.tel}"><br>
            生日:<span th:text="${user.birthday}"></span><br>
    <hr>
    员工信息：姓名:<span th:text="${employee.name}"></span><br>
            工资:<span th:text="${employee.price}"></span><br>
            工资的评级： <span th:if="${employee.price < 10000}">底薪员工</span>
                       <span th:if="${employee.price >= 10000}">高薪员工</span><br>
            状态:<span th:text="${employee.state}"></span><br>
                <div th:switch="${employee.state}">
                    <span th:case="在职">去领工资</span>
                    <span th:case="离职">欢迎回来</span>
                </div>
    <hr>
    <table border="1" cellspacing="0" width="50%">
        <thead>
            <tr><th>姓名</th><th>工资</th><th>状态</th><th>操作</th></tr>
        </thead>
        <tbody>
            <tr th:each="e : ${emList}">
                <td th:text="${e.name}"></td>
                <td th:text="${e.price}"></td>
                <td th:text="${e.state}"></td>
                <td><a th:if="${e.state == '在职'}" th:href="@{/thymeleaf/emDel(id=${e.id})}">离职</a></td></tr>
        </tbody>
    </table>
    <hr>
    <table border="1" cellspacing="0" width="50%">
        <thead>
        <tr><th>编号</th><th>姓名</th><th>工资</th><th>状态</th><th>操作</th></tr>
        </thead>
        <tbody>
        <tr th:each="e : ${emMap}">
            <td th:text="${e.key}"></td> <!--e.key表示得到键对象-->
            <td th:text="${e.value.name}"></td><!--e.value表示得到值对象-->
            <td th:text="${e.value.price}"></td>
            <td th:text="${e.value.state}"></td>
            <td><a th:if="${e.value.state == '在职'}" th:href="@{/thymeleaf/emDel(id=${e.value.id})}">离职</a></td></tr>
        </tbody>
    </table>
    <hr>
    <span th:each="i : ${#numbers.sequence(1,num)}" th:text="${i}"></span>
    <hr>
    <img th:src="@{'/html/img/'+${imgPath}}" width="200" height="200">
</body>
</html>